// 【 公共、全局 】 相关接口
import request from '@/utils/request'
import requestAuth from '@/utils/requesstAuth'
// 获取登录信息
export const getLoginUser = (data) => {
  return request({ url: `/xddcloud-psc/psc/user/loginuser`, method: 'get', data })
}
// 获取菜单树
export const getMenuTree = (data) => {
  return request({ url: `/xddcloud-psc/psc/menu/tree`, method: 'POST', data })
}

// 模拟登录
export const login = data => {
  return request({
    url: `/xddcloud-auth-server/auth/oauth2/token`, method: 'POST', data, headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 模拟登出
export const logout = data => {
  return request({ url: `/notice/login`, method: 'get', data })
}

// 测试3
export const test = (data, headers) => {
  return request({ url: `/dataAccount/importExcel`, method: 'post', data, headers, 'contentType': 'multipart/form-data', 'responseType': 'blob' })
}

// 登出
export const logoutGoHome = data => {
  return request({ url: `/xddcloud-auth-server/auth/token/logout`, method: 'get', data })
}